#include "PhongMaterial.h"
#include "Integrator.h"

Color PhongMaterial::shade(const Scene *scene, const Ray & ray, const IntersectResult &intersect, const TraceState & traceState) const {
	//Double NDotL = normal * 
	Color d = diffuse ? diffuse->shade(scene, ray, intersect, traceState) : Colors::White;
	d = scene->getIntegrator()->getIrradiance(scene, intersect.position, intersect.normal, traceState, d);
	d *= strength;
	return d;
}
